<?php
$languages = array();
$path = '../xml/languages.xml' ;

function readXml($path = ''){
    global $languages;
    $xml = new SimpleXMLElement($path, NULL, TRUE);
    
    foreach ($xml as $value) {
//        print_r($value->{'lang'});
        $lang = (string)$value->{'lang'} ;
        
        $languages[$lang]['label'] = (string)$value->{'label'};
        $languages[$lang]['home'] = (string)$value->{'home'};
        $languages[$lang]['about'] = (string)$value->{'about-us'};
        $languages[$lang]['service'] = (string)$value->{'service'};
        $languages[$lang]['contact'] = (string)$value->{'contact-us'};
    }
}
readXml($path) ;
?>